<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <meta charset="UTF-8">
    <title>index</title>
</head>
<body>
<h3>[[${msg}]]</h3>

    <hr>
    <!--shiro:guest的运用，下面两种方式都生效
        Shiro 权限标签：
        https://www.cnblogs.com/roxy/p/7688092.html
     -->
    <!--<div shiro:guest="">
        <a th:href="@{/login}">登录</a>
    </div>-->
    <shiro:guest>
        <a th:href="@{/login}">登录</a>
    </shiro:guest>

    <div shiro:hasPermission="'user:add'">
        <a th:href="@{/user/add}">添加</a>
    </div>
    <div shiro:hasPermission="user:update">
        <a th:href="@{/user/update}">修改</a>
    </div>
</body>
</html>